/**
 * 部署步骤:
 * 
 * 1.上传文件到服务器的部署目录（示例:/usr/local/nginx/html/wx/boot/）
 * 
 * 2.nginx 部署配置: 
 * location /wx {
				alias /usr/local/nginx/html/wx/;
				autoindex on;
				add_header Last-Modified $date_gmt;
			  add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
			  if_modified_since off;
			  expires off;
			  etag off;
			}	
 * 3. baseUrl的部署相对路径为:/wx/boot/js  
 * 4.部署的访问地址为: http:www.xxx.com/wx/boot/pages/index.html       
 */

const isPub = false;
const _baseUrl = isPub ? '[部署的相对路径]' : "/js"
require.config({
  baseUrl: '/js', // 指定模块根目录，相对于index.html的路径，默认为main.js所在目录
  paths: {
    // 第三方库
    jquery: 'https://s3.pstatp.com/cdn/expire-1-M/jquery/3.3.1/jquery.min',
    ajaxhook: 'https://unpkg.com/ajax-hook@2.0.3/dist/ajaxhook.min',
    jweixin: 'https://res2.wx.qq.com/open/js/jweixin-1.6.0',
    weui: 'https://res.wx.qq.com/open/libs/weuijs/1.2.1/weui.min', // 文档https://github.com/Tencent/weui.js/blob/master/docs/README.md
    fastclick: 'lib/fastclick',
    clipboard: 'lib/clipboard.min',
    VConsole: 'lib/vconsole.min',
    md5: 'lib/md5',
    qrcode: 'lib/qrcode.min',
    pulltorefresh: 'lib/pulltorefresh',
    jsencrypt: 'lib/jsencrypt.min',
    cityData: 'lib/city-data',
    compressor:'lib/compressor.min',
    //工具类
    UrlUtil: 'utils/UrlUtil',
    CacheUtil: 'utils/CacheUtil',
    PhoneUtil: 'utils/PhoneUtil',
    StrUtil: 'utils/StrUtil',
    ScrollUtil: 'utils/ScrollUtil',
    CookieUtil: 'utils/CookieUtil',
    PickerUtil: 'utils/PickerUtil',
    DateUtil: 'utils/DateUtil',
    //api
    PageInit: 'pageInit',
    OauthCache: 'api/oauth-cache',
    WxJsdkSign: 'api/wxJsdkSign',
    OauthApi: 'api/oauth-api',
    BaseApi: 'api/base-api',
    OauthApi: 'api/oauth-api',
    ApiInterceptor: 'api/interceptor',

    //业务
    MyCache: 'app/my-cache',
    fragmentMsg: 'app/user/fragment-msg',
    fragmentDevice: 'app/user/fragment-device',
    fragmentMe: 'app/user/fragment-me'
  },
  // 使用参考: https://my.oschina.net/ososchina/blog/668548
  shim: {
    clipboard: {
      exports: 'ClipboardJS', //重新定义点击复制的函数名
      deps: ['jquery'] //需要依赖jquery
    },
    qrcode: {
      exports: 'QRCode'
    }
  }
});